package cn.lbwfree.day3_16;

import java.util.Iterator;
import java.util.LinkedList;
import java.util.Scanner;


/**
 * @date:2020年3月16日
 * @author:lbwfree
 */
public class String_graph {
	public static void main(String[] args) {
		Scanner inScanner = new Scanner(System.in);
		int n=inScanner.nextInt();
		int m=inScanner.nextInt();
		char start='A';
		char temp ='A';
		LinkedList<Character> query=new LinkedList<Character>();
		for (int i = 0; i < m; i++) {
			query.add(start);
			start++;
		}
		print(query);
		for (int i = 0; i <n-1; i++) {
			query.addFirst(++temp);
			query.removeLast();
			print(query);
		}
		
	}
	private static void print(LinkedList<Character> queue) {
		Iterator<Character> iterator =queue.iterator();
		while(iterator.hasNext())
		{
			System.out.print(iterator.next());
		}
		System.out.println();
		
	}

}
